﻿<%@ Page Language="C#" MasterPageFile="~/MainPage.master" AutoEventWireup="true"
    CodeFile="OrderDetails.aspx.cs" Inherits="OrderDetails" Title="Order Details" %>

<asp:Content ID="webOrderDetailsTitle" ContentPlaceHolderID="cphTitle" runat="Server">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Order Details
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="Home.aspx">Home</a> </li>
                <li class="active"><i class="fa fa-file"></i>Order Details </li>
            </ol>
        </div>
    </div>
</asp:Content>
<asp:Content ID="webOrderDetails" ContentPlaceHolderID="cphMainPage" runat="Server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link href="css/CSSGridView1.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div>
            <table>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td colspan="2">
                                    Order ID:
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtOrderID" Width="100%" runat="server" Enabled="False"></asp:TextBox>
                                </td>
                                <td Width="80px">
                                    &nbsp;
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;</td>
                                <td colspan="3">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    Product:
                                </td>
                                <td colspan="3">
                                    <asp:DropDownList ID="ddlProduct" Width="100%" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    Unit Price:
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtUnitPrice" Width="100%" runat="server"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;
                                    <asp:RangeValidator ID="valPrice" runat="server" 
                                        ControlToValidate="txtUnitPrice" Display="Dynamic" 
                                        ErrorMessage="Must be number!" MaximumValue="99999" MinimumValue="0" 
                                        Type="Double"></asp:RangeValidator>
                                    <asp:RequiredFieldValidator ID="reqUnitPrice" runat="server" 
                                        ErrorMessage="Required Field!" ControlToValidate="txtUnitPrice" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                </td>
                                <td rowspan="3" align="right">
                                    <asp:GridView ID="gvOrderDetails" runat="server" AutoGenerateColumns="false" 
                                        CssClass="Grid" AlternatingRowStyle-CssClass="alt"
                        PagerStyle-CssClass="pgr" onselectedindexchanged="gvOrderDetails_SelectedIndexChanged">
                                        <Columns>
                                            <asp:BoundField DataField="orderid" HeaderText="Order ID" SortExpression="DateField" />
                                            <asp:BoundField DataField="productid" HeaderText="Product ID" SortExpression="DateField" />
                                            <asp:BoundField DataField="unitprice" HeaderText="Unit Price" SortExpression="DateField" />
                                            <asp:BoundField DataField="qty" HeaderText="Quantity" SortExpression="DateField" />
                                            <asp:BoundField DataField="discount" HeaderText="Discount" SortExpression="DateField" />
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    Quantity:
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtQuantity" Width="100%" runat="server"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;
                                    <asp:RangeValidator ID="valQuantity" runat="server" 
                                        ControlToValidate="txtQuantity" Display="Dynamic" 
                                        ErrorMessage="Must be number!" MaximumValue="9999" MinimumValue="0" 
                                        Type="Integer"></asp:RangeValidator>
                                    <asp:RequiredFieldValidator ID="reqQuantity" runat="server" 
                                        ErrorMessage="Required Field!" ControlToValidate="txtQuantity" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="left">
                                    Discount:
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtDiscount" Width="100%" runat="server"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;&nbsp;<asp:RangeValidator ID="valDiscount" runat="server" 
                                        ControlToValidate="txtDiscount" Display="Dynamic" 
                                        ErrorMessage="Number between 0 and 1!" MaximumValue="1" MinimumValue="0"></asp:RangeValidator>
                                    <asp:RequiredFieldValidator ID="reqDiscount" runat="server" 
                                        ErrorMessage="Required Field!" ControlToValidate="txtDiscount" 
                                        Display="Dynamic"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;</td>
                                <td colspan="3">
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td Width="10px">
                                    &nbsp;</td>
                                <td Width="80px">
                                    <asp:Button ID="btnNew" runat="server" Text="New" CausesValidation="False" 
                                        onclick="btnNew_Click" Width="100%"/>
                                </td>
                                <td Width="50px">
                                    &nbsp;</td>
                                <td Width="80px">
                                    <asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" Width="100%"/>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;
                                </td>
                                <td align="right">
                                    <asp:Button ID="btnBack" runat="server" CausesValidation="False" 
                                        onclick="btnBack_Click" Text="Back" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    <asp:Button ID="btnUpdate" runat="server" Text="Update" Enabled="False" 
                                        onclick="btnUpdate_Click" Width="100%"/>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                                        CausesValidation="False" Enabled="False" onclick="btnDelete_Click" Width="100%"/>
                                </td>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
    </body>
    </html>
</asp:Content>
